/*
day50_2
2019.10.17
*/ 

struct TreeNode{
	int val;
	struct TreeNode *left;
	struct TreeNode *right;
};

bool isMinior(struct TreeNode *p,struct TreeNode *q)
{
	if(!p&&!q) return true;
	if(!p||!q) return false;
	if(p->val!=q->val) return false;
	
	return isMinior(p->left,q->right)&&isMinior(p->right,q->left);
}

bool isSymmetric(struct TreeNode* root){
	
	if(!root) return true;
	if(!root->left&&!root->right) return true;
	
	if(!root->left||!root->right) return false;
	
	return isMinior(root->left,root->right);
}


int main()
{
	return 0;
}
